﻿using System;

namespace Ficharts.Net.Examples.Examples
{
    using System.Linq;

    using Ficharts.Net.Examples.Code;

    public partial class BubbleColumnLine : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var chart = this.Test;
            chart.ChartTitle.Title = "04-10年销售业绩";
            chart.XAxises.Add(new FieldAxis { Title = "年份" });
            chart.YAxises.Add(new LinearAxis { Title = "利润" });

            chart.Series.Add(new Area { SeriesName = "产品A", XField = "Year", YField = "ValueA" });
            chart.Series.Add(new Bubble { SeriesName = "产品B", XField = "Year", YField = "ValueB",RadiusField = "ValueD"});
            chart.Series.Add(new Column { SeriesName = "产品C", XField = "Year", YField = "ValueC" });
            chart.Series.Add(new Line { SeriesName = "产品D", XField = "Year", YField = "ValueD",Smooth = true});

            Demo demo = new Demo();
            chart.DataSource = (from c in demo.sample
                                select c).ToList();
            Test.DataBind();
        }
    }
}